package com.cans.command;

/**
 * 遥控器
 *
 * @author cans
 * @date 2022/5/8
 **/
public class Control {

    public static void call(Cmd cmd) {
        cmd.execute();
    }


    public static void main(String[] args) {
        Tv tv = new Tv();
        Cmd cmd1 = new SoundUpCmdImpl(tv);
        Cmd cmd2 = new SoundDownCmdImpl(tv);

        Control.call(cmd1);
        Control.call(cmd2);
    }


}
